<template>
	<view class="consulting">
		<view class="left">
			<view class="left_top">
				<view class="onLine">
					在线
				</view>
				<view class="onLine_font">
					查找十次，不如咨询一次！
				</view>
			</view>
			<view class="left_bottom">
				<view class="flag_card">
					真人客服
				</view>
				<view class="flag_card">
					即问即答
				</view>
				<view class="flag_card">
					一分钟内回复
				</view>
			</view>
		</view>
		<image class="rightHand" src="@/static/images/knowledge/drug/rightHand.png"></image>
		<view @click="toWxkf" class="consulting_button">
			免费咨询
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			toWxkf() {
				// window.open('https://work.weixin.qq.com/ca/cawcdedcf41d9a6af6')
					if (plus.os.name == 'Android') {
						//安卓
						if (
							plus.runtime.isApplicationExist({
								pname: 'com.tencent.mm'
							})
						) {
							plus.runtime.openURL(
								'https://work.weixin.qq.com/ca/cawcdef5355a9f50ae',
								function(res) {
									console.log(res);
								}
							);
						} else {
							uni.showModal({
								title: '提示',
								content: '您还没有此APP,去下载',
								success: function(res) {
									if (res.confirm) {
										plus.runtime.openURL('https://a.app.qq.com/o/simple.jsp?pkgname=com.tencent.mm', function(res) {
											console.log(res);
										});
									} else if (res.cancel) {
										console.log('用户点击取消');
									}
								}
							});
						}
					} else if (plus.os.name == 'iOS') {
						plus.runtime.launchApplication(
							{
								action:
									'https://work.weixin.qq.com/ca/cawcdef5355a9f50ae'
							},
							function(e) {
								uni.showModal({
									title: '提示',
									content: '您还没有此APP,去下载',
									success: function(res) {
										if (res.confirm) {
											plus.runtime.openURL('https://a.app.qq.com/o/simple.jsp?pkgname=com.tencent.mm', function(res) {
												console.log(res);
											});
										} else if (res.cancel) {
											console.log('用户点击取消');
										}
									}
								});
							}
						);
					}
			
			
			},
		}
	}
</script>

<style lang="scss" scoped>
.consulting{
	height: 137rpx;
	background: #FFFFFF;
	box-shadow: inset 0rpx 0rpx 24rpx 0rpx rgba(1, 124, 126, 0.1);
	border-radius: 24rpx;
	border: 1rpx solid #7AE7F1;
	margin-top: 19rpx;
	padding: 24rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	.left{
		width: 410rpx;
		.left_top{
			display: flex;
			justify-content: space-between;
			.onLine{
				padding: 0 8rpx;
				background: #EDFAE1;
				border-radius: 0rpx 8rpx 8rpx 8rpx;
				text-align: center;
				font-size: 24rpx;
				color: #52C41A;
				line-height: 34rpx;
			}
			.onLine_font{
				margin-left: 16rpx;
				font-weight: normal;
				font-size: 28rpx;
				color: #001214;
				line-height: 34rpx;
			}
		}
		.left_bottom{
			display: flex;
			justify-content: space-between;
			margin-top: 16rpx;
			.flag_card {
				line-height: 39rpx;
				border-radius: 4rpx;
				border: 1rpx solid #2C8FFF;
				text-align: center;
				padding: 0 8rpx;
				font-weight: 400;
				font-size: 24rpx;
				color: #2C8FFF;
			}
		}
	}
	.rightHand{
		width: 30rpx;
		height: 30rpx;
	}
	.consulting_button{
		width: 191rpx;
		line-height: 66rpx;
		background: linear-gradient( 90deg, #3EE79C 0%, #03EEF9 100%);
		border-radius: 65rpx;
		text-align: center;
		font-weight: bold;
		font-size: 30rpx;
		color: #FFFFFF;
	}
}
</style>
